<div class="container-fluid" style="padding: 20px 10px 0px 10px">
	<div class="row-fluid">
		<div class="well">
		    <ul class="nav nav-tabs">
		      <li class="active"><b>添加系统消息</b></li>
		    </ul>
		    <div id="myTabContent" class="tab-content">
				<div class="tab-pane active in" id="home">
					<form id="formid" action="/sysmsg/addsysmsg" method="post">

						<p><label>消息标题：<input type="text" value="<?php echo $info['sys_msg_title'] ?>" placeholder="消息标题" style="width:420px" name="title"  class="checktitle">&nbsp;排序：<input type="text" value="<?=$info['sort']?>"  style="width:89px" name="sort" ></label></p>
						<p><label>消息图片：<input type="text" value="<?php echo $info['sys_msg_pic'] ?>" placeholder="消息图片" class="sysMsgPicText" id="sysMsgPic" style="width:478px" name="sys_msg_pic" >&nbsp;<input type="button" class="btn btn-info setpicBtn"  alt='' style='margin-top:-8px' value="选择图片" ></label></p>
						<p>消息类型：<label style="display: inline;margin-top: 20px;margin-bottom: 20px;"><input type="radio" value="0" name="msg_type"  class="checktitle" checked> 链接</label> <label style="display: inline;margin-left: 10px;margin-bottom: 20px;margin-top: 20px;"><input type="radio" value="1" name="msg_type"  class=""> 图文</label></p>
						<p class="con"><textarea style="width:200px;height:260px"  name="content" placeholder="消息内容" class=""><?php echo $info['sys_msg_content'] ?></textarea></p>
						<p class="url"><label>链接地址：<input type="text" value="<?php echo $info['sys_msg_url'] ?>" style="width:420px" name="msg_url"  class="checktitle1"></label></p>
						</p>
						<input type="hidden" value="<?=$info['sys_msg_id']?>" name="sys_msg_id" />
						<input type="hidden" value="1" name="dosubmit" />
					</form>
				</div>
				<div class="btn-toolbar">
				    <button class="btn btn-primary" id="btn-save"><i class="icon-save"></i> 确认</button>
				  <div class="btn-group">
				  </div>
				</div>
			</div>
		</div>
	</div>
</div>
<script>
$(function(){
	$(".setpicBtn").click(function () {
		$("#sysMsgPic").selfups();
	});
	$('#btn-save').click(function(){
		var title = $("input[name='title']").val();
		if(!title) {
			alert("标题不能为空！");
			return false;
		}
		// var content = $("textarea[name='content']").val();
		// if(!content) {
		// 	alert("内容不能为空！");
		// 	return false;
		// }
		setBtn($('#btn-save'));
		$('#formid').submit();
	});

	$('input[name=msg_type]').click(function() {
		v = $(this).val();
		if(v == 1){
			$('.con').show();
			$('.url').hide();
		}else{
			$('.url').show();
			$('.con').hide();
		}
	}).trigger('click');

})
</script>